package com.pj.ca.bc;

import org.bouncycastle.jce.provider.BouncyCastleProvider;

import java.security.Provider;

/**
 * 描述：提供者创建工具
 *
 * @author pengjun
 * @date 2021/11/3 11:06
 */
public class ProviderInstance {
    private static Provider BCProvider;

    public static Provider getBCProvider() {
        if (null == BCProvider) {
            synchronized (ProviderInstance.class) {
                if (null == BCProvider) {
                    BCProvider = new BouncyCastleProvider();
                }
            }
        }
        return BCProvider;
    }
}
